package ipad.asia.service.productCopy;

import ipad.asia.entity.Product;
import ipad.asia.entity.ProductCopy;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value ="PROVIDER-PRODUCT")
public interface ProductCopyFeign {
    @PostMapping("/productCopy/saveObj")
     void addObj(@RequestBody ProductCopy product);

    @RequestMapping("/productCopy/get/id")
     ProductCopy getById(@RequestParam("id") int id) ;

    @RequestMapping("/productCopy/get/ShopId")
     List<ProductCopy> getShopId(@RequestParam(value = "ShopId",required = false)int shopId);

    //删除
    @RequestMapping("/productCopy/delete")
     void DeleteById(@RequestParam(value = "id",required = false)int id);

}
